// TrayObserver.h: interface for the CTrayObserver class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_TRAYOBSERVER_H__6BA2049A_5D15_4BA5_89DD_73F84C3192A6__INCLUDED_)
#define AFX_TRAYOBSERVER_H__6BA2049A_5D15_4BA5_89DD_73F84C3192A6__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000



#define MAXTRAYICONNUMBER 30
#define BUTTONTEXTMAX	5000

#define MAXSEARCHLEVEL	10


class CTrayObserver  
{
private:


	int m_serchlevelfuse;

	static BOOL CALLBACK TrayEnumWindowsProc(          HWND hwnd,    LPARAM lParam);
	LPTSTR m_traydata;
	HANDLE m_trayproc;
	

	CString GetButtonText(int N);
	void ClearText();


	CString m_text[MAXTRAYICONNUMBER];

	HWND m_tmphwnd;

	HWND m_hWnd;
	HWND FindTrayWindow();

	int m_IconCount;

	HWND FindTrayWindow2();

public:
	CString GetAllText();
	BOOL IsValid();
	BOOL IsTextExist(CString text);

	void Update();
	CTrayObserver();
	virtual ~CTrayObserver();

};

#endif // !defined(AFX_TRAYOBSERVER_H__6BA2049A_5D15_4BA5_89DD_73F84C3192A6__INCLUDED_)
